package simplescenegraph.assets;

import java.nio.ByteBuffer;

public class Texture {
	
	private String fileName;
	
	private int width;
	
	private int height;
	
	private boolean hasAlpha = false;
	
	private ByteBuffer pixels;
	
	private boolean registered = false;
	
	public Texture(String fileName, int width, int height, boolean hasAlpha) {
		this.fileName = fileName;
		this.width = width;
		this.height = height;
		this.hasAlpha = hasAlpha;
	}
	
	public int getHeight() {
		return height;
	}
	
	public ByteBuffer getPixels() {
		return pixels;
	}
	
	public int getWidth() {
		return width;
	}
	
	public boolean isRegistered() {
		return registered;
	}
	
	public String getFileName() {
		return fileName;
	}
	
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	
	public boolean hasAlpha() {
		return hasAlpha;
	}
	
	public void setRegistered(boolean registered) {
		this.registered = registered;
	}

	void setPixels(ByteBuffer pixels) {
		if (pixels == null) {
			throw new IllegalArgumentException();
		}
		
		this.pixels = pixels;
	}
}
